
<?php

use yii\widgets\ActiveForm;
use kartik\widgets\FileInput
?>

<?php
$form = ActiveForm::begin([
            'action' => ['index'],
            'options' => ['enctype' => 'multipart/form-data', 'id' => 'form2', 'name' => 'form2']
        ])
?>

<div class="col-md-5" style="margin: 10px 0 15px 15px;">
    <label class="control-label" style="float: left;margin-right: 15px;margin-top: 5px;">导入</label>

    <div style="overflow: hidden;padding: 0 28px 0 0" class="col-lg-12">
        <?php
        echo FileInput::widget([
            'model' => $model,
            'attribute' => 'file',
            'pluginOptions' => [
                'showPreview' => false,
                'showCaption' => true,
                'showRemove' => false,
                'showUpload' => true,
                'uploadLabel' => '导入',
                'uploadTitle' => '导入选中文件',
            ],
        ]);
        ?>
    </div>
</div>

  <?php ActiveForm::end(); ?>
